package lgs.hm.homework.work3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Servant {

	private String name = "吴妈";
	private Integer age = 50;
	private Character sex = '女';
	
	@Autowired
	private XiaoMing xm;
	
	public Servant() {}

	public Servant(String name, Integer age, Character sex) {
		super();
		this.name = name;
		this.age = age;
		this.sex = sex;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Character getSex() {
		return sex;
	}

	public void setSex(Character sex) {
		this.sex = sex;
	}

	public XiaoMing getXm() {
		return xm;
	}

	public void setXm(XiaoMing xm) {
		this.xm = xm;
	}

	@Override
	public String toString() {
		return "Servant [name=" + name + ", age=" + age + ", sex=" + sex + ", xm=" + "小明" + "]";
	}
	
	
	
}
